package com.yuw.oop.polymorphicdemo4;

public class Animal {
	//属性
	 String animalName="animal";
	private String animalColor;
	private String animalSex;
	//构造方法
	
	public Animal(String animalName, String animalColor, String animalSex) {
		super();
		this.animalName = animalName;
		this.animalColor = animalColor;
		this.animalSex = animalSex;
	}
	//显示提供构造方法

	public Animal() {
		super();
		 
	}




	//行为
	/**
	 * 行为方法：吃饭
	 */
	public void doEating() {
		System.out.println(this.animalName+"is eating ...");
	}
	
	/**
	 * 行为方法：睡觉
	 */
	public void doSleeping() {
		System.out.println(this.animalName+"is sleeping...");
	}
	
	
	//getter/setter
	public String getAnimalName() {
		return animalName;
	}
	public void setAnimalName(String animalName) {
		this.animalName = animalName;
	}
	public String getAnimalColor() {
		return animalColor;
	}
	public void setAnimalColor(String animalColor) {
		this.animalColor = animalColor;
	}
	public String getAnimalSex() {
		return animalSex;
	}
	public void setAnimalSex(String animalSex) {
		this.animalSex = animalSex;
	}
	
 
}
